home *** CD-ROM | disk | FTP | other *** search
- function XMLLoadingError()
- {
- fscommand("quit");
- }
- function CreateMenu(menuXML, menuName, xPos, yPos)
- {
- this.createEmptyMovieClip("menu_ver",1);
- this.menu_ver._x = xPos;
- this.menu_ver._y = yPos;
- this.menu_ver_xPos = this.menu_ver._x;
- this.menu_ver_yPos = this.menu_ver._y;
- this.menu_ver_depth = 1;
- this.createEmptyMovieClip("menu_hor",2);
- this.menu_hor._x = 507;
- this.menu_hor._y = 65;
- this.menu_hor_xPos = this.menu_hor._x;
- this.menu_hor_yPos = this.menu_hor._y;
- this.menu_hor_depth = 1000;
- if(menuXML.firstChild.nodeName == "menu_1")
- {
- CreateMenu_1(menuXML,"menu_1",this.menu_ver_xPos,this.menu_ver_yPos);
- }
- else
- {
- XMLLoadingError();
- }
- }
- function CreateMenu_1(menuXML, menuName)
- {
- var _loc9_ = menuXML.childNodes.length;
- var _loc2_ = 0;
- while(_loc2_ < _loc9_)
- {
- if(menuXML.childNodes[_loc2_].nodeName == menuName)
- {
- var _loc3_ = menuName + "_" + _loc2_;
- var _loc6_ = menuXML.childNodes[_loc2_].attributes.id;
- var _loc5_ = menuXML.childNodes[_loc2_].attributes.name;
- var _loc8_ = menuXML.childNodes[_loc2_].attributes.photo_gallery;
- this.menu_ver_depth += 1;
- this.menu_ver.attachMovie("item_" + menuName,_loc3_,this.menu_ver_depth);
- this.menu_ver[_loc3_]._x = this.menu_ver_xPos;
- this.menu_ver_yPos += this.menu_ver[_loc3_]._height;
- this.menu_ver[_loc3_]._y = this.menu_ver_yPos;
- this.menu_ver[_loc3_].menu_name.text = _loc5_;
- this.menu_ver[_loc3_].m_1 = _loc2_;
- this.menu_ver[_loc3_].m_2 = -1;
- this.menu_ver[_loc3_].m_3 = -1;
- this.menu_ver[_loc3_].m_4 = -1;
- this.menu_ver[_loc3_].id = _loc6_;
- this.menu_ver[_loc3_].name = _loc5_;
- this.menu_ver[_loc3_].photo_gallery_exists = _loc8_;
- if(_loc2_ != this.menu_1_clicked)
- {
- this.menu_ver[_loc3_].btn.onRelease = function()
- {
- this._parent._parent._parent.initButtonsClicked(1,this._parent.m_1);
- this._parent._parent._parent.gotoAndPlay(2);
- this._parent._parent._parent._parent.initCurrentSection(this._parent.m_1,this._parent.m_2,this._parent.m_3,this._parent.m_4,this._parent.id,this._parent.name,this._parent.photo_gallery_exists);
- };
- }
- }
- if(menuXML.childNodes[_loc2_].firstChild.nodeName == "menu_2")
- {
- if(_loc2_ == this.menu_1_clicked)
- {
- CreateMenu_2(menuXML.childNodes[_loc2_],"menu_2",_loc2_);
- }
- }
- _loc2_ = _loc2_ + 1;
- }
- }
- function CreateMenu_2(menuXML, menuName, parent_1)
- {
- var _loc9_ = menuXML.childNodes.length;
- var _loc3_ = 0;
- while(_loc3_ < _loc9_)
- {
- if(menuXML.childNodes[_loc3_].nodeName == menuName)
- {
- var _loc2_ = menuName + "_" + parent_1 + "_" + _loc3_;
- var _loc6_ = menuXML.childNodes[_loc3_].attributes.id;
- var _loc5_ = menuXML.childNodes[_loc3_].attributes.name;
- this.menu_ver_depth += 1;
- this.menu_ver.attachMovie("item_" + menuName,_loc2_,this.menu_ver_depth);
- this.menu_ver[_loc2_]._x = this.menu_ver_xPos;
- this.menu_ver_yPos += this.menu_ver[_loc2_]._height;
- this.menu_ver[_loc2_]._y = this.menu_ver_yPos;
- this.menu_ver[_loc2_].menu_name.text = _loc5_;
- this.menu_ver[_loc2_].m_1 = parent_1;
- this.menu_ver[_loc2_].m_2 = _loc3_;
- this.menu_ver[_loc2_].m_3 = -1;
- this.menu_ver[_loc2_].m_4 = -1;
- this.menu_ver[_loc2_].id = _loc6_;
- this.menu_ver[_loc2_].name = _loc5_;
- this.menu_ver[_loc2_].btn.onRelease = function()
- {
- this._parent._parent._parent.initButtonsClicked(2,this._parent.m_2);
- this._parent._parent._parent.gotoAndPlay(2);
- this._parent._parent._parent._parent.initCurrentSection(this._parent.m_1,this._parent.m_2,this._parent.m_3,this._parent.m_4,this._parent.id,this._parent.name,"");
- };
- }
- if(menuXML.childNodes[_loc3_].firstChild.nodeName == "menu_3")
- {
- if(_loc3_ == this.menu_2_clicked)
- {
- CreateMenu_3(menuXML.childNodes[_loc3_],"menu_3",parent_1,_loc3_);
- }
- }
- _loc3_ = _loc3_ + 1;
- }
- }
- function CreateMenu_3(menuXML, menuName, parent_1, parent_2)
- {
- var _loc12_ = menuXML.childNodes.length;
- var _loc3_ = 0;
- while(_loc3_ < _loc12_)
- {
- if(menuXML.childNodes[_loc3_].nodeName == menuName)
- {
- var _loc2_ = menuName + "_" + parent_1 + "_" + parent_2 + "_" + _loc3_;
- var _loc9_ = menuXML.childNodes[_loc3_].attributes.id;
- var _loc5_ = menuXML.childNodes[_loc3_].attributes.name;
- this.menu_hor_depth += 1;
- this.menu_hor.attachMovie("item_" + menuName,_loc2_,this.menu_hor_depth);
- this.menu_hor[_loc2_]._y = this.menu_hor_yPos;
- this.menu_hor_xPos -= this.menu_hor[_loc2_]._width;
- this.menu_hor[_loc2_]._x = this.menu_hor_xPos;
- this.menu_hor[_loc2_].menu_name.text = _loc5_;
- this.menu_hor[_loc2_].m_1 = parent_1;
- this.menu_hor[_loc2_].m_2 = parent_2;
- this.menu_hor[_loc2_].m_3 = _loc3_;
- this.menu_hor[_loc2_].m_4 = -1;
- this.menu_hor[_loc2_].id = _loc9_;
- this.menu_hor[_loc2_].name = _loc5_;
- this.menu_hor[_loc2_].btn.onRelease = function()
- {
- this._parent._parent._parent.initButtonsClicked(3,this._parent.m_3);
- this._parent._parent._parent.gotoAndPlay(2);
- this._parent._parent._parent._parent.initCurrentSection(this._parent.m_1,this._parent.m_2,this._parent.m_3,this._parent.m_4,this._parent.id,this._parent.name,"");
- };
- }
- if(menuXML.childNodes[_loc3_].firstChild.nodeName == "menu_4")
- {
- if(_loc3_ == this.menu_3_clicked)
- {
- var _loc7_ = this.menu_hor[_loc2_]._x;
- var _loc6_ = this.menu_hor[_loc2_]._y;
- CreateMenu_4(menuXML.childNodes[_loc3_],"menu_4",parent_1,parent_2,_loc3_,_loc7_,_loc6_);
- }
- }
- _loc3_ = _loc3_ + 1;
- }
- }
- function CreateMenu_4(menuXML, menuName, parent_1, parent_2, parent_3, xPos, yPos)
- {
- var _loc12_ = menuXML.childNodes.length;
- var _loc3_ = 0;
- while(_loc3_ < _loc12_)
- {
- if(menuXML.childNodes[_loc3_].nodeName == menuName)
- {
- var _loc2_ = menuName + "_" + parent_1 + "_" + parent_2 + "_" + parent_3 + "_" + _loc3_;
- var _loc7_ = menuXML.childNodes[_loc3_].attributes.id;
- var _loc4_ = menuXML.childNodes[_loc3_].attributes.name;
- this.menu_hor_depth += 1;
- this.menu_hor.attachMovie("item_" + menuName,_loc2_,this.menu_hor_depth);
- this.menu_hor[_loc2_]._x = xPos;
- yPos += this.menu_hor[_loc2_]._height;
- this.menu_hor[_loc2_]._y = yPos;
- this.menu_hor[_loc2_].menu_name.text = _loc4_;
- this.menu_hor[_loc2_].m_1 = parent_1;
- this.menu_hor[_loc2_].m_2 = parent_2;
- this.menu_hor[_loc2_].m_3 = parent_3;
- this.menu_hor[_loc2_].m_4 = _loc3_;
- this.menu_hor[_loc2_].id = _loc7_;
- this.menu_hor[_loc2_].name = _loc4_;
- this.menu_hor[_loc2_].btn.onRelease = function()
- {
- this._parent._parent._parent.initButtonsClicked(3);
- this._parent._parent._parent.initButtonsClicked(4,this._parent.m_4);
- this._parent._parent._parent.gotoAndPlay(2);
- this._parent._parent._parent._parent.initCurrentSection(this._parent.m_1,this._parent.m_2,this._parent.m_3,this._parent.m_4,this._parent.id,this._parent.name,"");
- };
- }
- _loc3_ = _loc3_ + 1;
- }
- }
-